﻿using System;
using System.Collections.Generic;
using System.Text;

namespace LIU.Framework.Common.Extend
{
    public static class ExceptionExtend
    {
        /// <summary>
        /// 获取所有的异常信息
        /// </summary>
        /// <param name="ex"></param>
        /// <returns></returns>
        public static string GetAllMessage(this Exception ex)
        {
            return $"{ex.Message}\r\n{ex.Source}\r\n{ex.StackTrace}\r\n{ex.TargetSite}";
        }
    }
}
